let url = location.href
let id = splitStrToObject(url)


//首页数据
function banner_ajax() {
    $.ajax({
        type: 'get',
        url: `https://www.xiongmaoyouxuan.com/api/tab/${id.id}?start=0`,
        success: function (data) { //响应的参数
            list(data.data.items.list)
        }
    })
}
banner_ajax()



//更多商品列表数据
function moreAjax(num) {
    $.ajax({
        type: 'get',
        url: `https://www.xiongmaoyouxuan.com/api/tab/${id.id}?start=${num*20}`,

        success: function (data) { //响应的参数
            console.log(data);
            list_more(data.data.items.list)
        }
    })
}
//点击加载更多
function btn_more() {
    let s = 0
    $('#morebtn>.btn').click(function () {
        s++
        moreAjax(s)
    })
}
btn_more()


